package com.atguigu.gulimail.product.service;

import com.atguigu.gulimail.product.vo.AttrGroupRelationVo;
import com.atguigu.gulimail.product.vo.AttrRespVo;
import com.atguigu.gulimail.product.vo.AttrVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimail.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author huangjianyun
 * @email 2409441649@qq.com
 * @date 2021-09-06 13:16:02
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);
    //保存属性
    void saveAttr(AttrVo attr);

    //根据商品分类id获取属性规格参数的分页信息
    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String type);

    //根据属性id进行获取属性分组实体响应视图对像
    AttrRespVo getAttrInfo(Long attrId);

    //修改 属性响应视图对象
    void updateAttr(AttrVo attr);

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    //删除属性分组和属性之间的关联关系
    void deleteRelation(AttrGroupRelationVo[] vos);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);
}

